<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Create Data</title>
    <!-- FontAwesome for icons -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
    <!-- Internal CSS -->
    <style>
        body {
            font-family: 'Arial', sans-serif;
            background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
            margin: 0;
            padding: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
        }

        .container {
            background: white;
            padding: 30px;
            border-radius: 10px;
            box-shadow: 0 0 20px rgba(0,0,0,0.1);
            width: 350px;
            text-align: center;
        }

        h1 {
            color: #333;
            margin-bottom: 20px;
        }

        .form-group {
            margin-bottom: 15px;
            text-align: left;
        }

        label {
            display: block;
            margin-bottom: 5px;
            color: #555;
            position: relative;
        }

        label i {
            position: absolute;
            left: 0;
            top: 50%;
            transform: translateY(-50%);
            margin-right: 8px;
            color: #888;
        }

        input[type="text"] {
            width: calc(100% - 22px);
            padding: 10px;
            margin-top: 5px;
            border: 1px solid #ddd;
            border-radius: 4px;
            box-sizing: border-box;
        }

        button {
            width: 100%;
            padding: 12px;
            border: none;
            background-color: #007bff;
            color: white;
            border-radius: 4px;
            cursor: pointer;
            transition: background-color 0.3s;
        }

        button:hover {
            background-color: #0056b3;
        }

        /* Responsive Design */
        @media (max-width: 600px) {
            .container {
                width: 90%;
                padding: 20px;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>Create New Data</h1>
        <form method="post" id="createDataForm">
            {% csrf_token %}
            <div class="form-group">
                <label for="month"><i class="fas fa-calendar-alt"></i> Month:</label>
                <input type="text" name="month" id="month" required>
            </div>
            <div class="form-group">
                <label for="award_amount"><i class="fas fa-money-bill-wave"></i> Award Amount:</label>
                <input type="text" name="award_amount" id="award_amount" required>
            </div>
            <button type="submit">Create</button>
        </form>
    </div>

    <!-- Internal JavaScript -->
    <script>
        document.getElementById('createDataForm').addEventListener('submit', function(event) {
            event.preventDefault();
            const month = document.getElementById('month').value;
            const awardAmount = document.getElementById('award_amount').value;

            if (month === '' || awardAmount === '') {
                alert('请填写所有字段');
                return;
            }

            // Additional validation can be added here

            // Submit the form
            this.submit();
        });
    </script>
</body>
</html>